package com.inspinia.config;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.inspinia.config.common.config.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * apollo配置
 * @author veblen
 */
@Configuration
@EnableApolloConfig({"application","db","redis","logback-rabbitmq","shiro","system","rabbitmq","role"})
public class ApolloConfigApplication {

    @Bean
    public DbConfig dbConfig() {
        return new DbConfig();
    }

    @Bean
    public RedisConfig redisConfig(){
        return new RedisConfig();
    }

    @Bean
    public LogbackRabbitConfig logbackRabbitConfig(){
        return new LogbackRabbitConfig();
    }

    @Bean
    public ShiroPropConfig shiroConfig(){
        return new ShiroPropConfig();
    }

    @Bean
    public SystemConfig systemConfig(){
        return new SystemConfig();
    }

    @Bean
    public RabbitConfig rabbitConfig(){
        return new RabbitConfig();
    }

    @Bean
    public RoleConfig roleConfig(){
        return new RoleConfig();
    }
}
